﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace FisheryPlatform.Search.Core.Resource
{
    public abstract class AbstractResource : IResource, IDisposable
    {
        // Fields
        protected static readonly string DefaultBasePath = AppDomain.CurrentDomain.BaseDirectory;

        // Methods
        protected AbstractResource()
        {
        }

        public abstract IResource CreateRelative(string relativePath);
        public abstract void Dispose();
        public abstract TextReader GetStreamReader();
        public abstract TextReader GetStreamReader(Encoding encoding);

        // Properties
        public virtual string FileBasePath
        {
            get
            {
                return DefaultBasePath;
            }
        }
    }


}
